<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script type="text/javascript" src="http://localhost/c45/xiangmu/boke/boke/Static/uploadify/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="http://localhost/c45/xiangmu/boke/boke/Static/uploadify/jquery.uploadify.min.js"></script>
	<link href="http://localhost/c45/xiangmu/boke/boke/Static/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>
	<link type="text/css" rel="stylesheet" href="http://localhost/c45/xiangmu/boke/boke/Static/hdjs/hdjs.css"/>
	<script type="text/javascript" src="http://localhost/c45/xiangmu/boke/boke/Static/hdjs/hdjs.min.js"></script>
</head>
<body>
	<div class="hd-menu-list">
	    <ul>
	        <li><a href="<?php echo U('Flink/index');?>">友链列表</a></li>
	        <li class="active"><a href="<?php echo U('Flink/add');?>">修改友链</a></li>

	    </ul>
	</div>
	<form action="" method="post">
		<table class="hd-table hd-table-form hd-form">
		    <thead>
		    <tr>
		        <td colspan="2">修改友链</td>
		    </tr>
		    </thead>
		    <tbody>
		    <tr>
		        <th>链接名称</th>
		        <td>
		            <input type="text" name="fname" id="" value="<?php echo $data['fname'];?>">
		        </td>
		    </tr>
		    <tr>
		    	<th>描述</th>
		    	<td><textarea name="msg" class="hd-w300 hd-h100" cols="30" rows="10"><?php echo $data['msg'];?></textarea></td>
		    </tr>
		    <tr>
		    	<th>logo</th>
		    	<td>
		    		<div lab="uploadFile">
	            <input id="file" type="file" multiple="true">
	            <span>类型: *.jpg,*.png 大小: 2000KB 数量: 10</span>
	            <script type="text/javascript">
	                $(function() {
	                    $('#file').uploadify({
	                        'formData'     : {//POST数据
	                            '<?php echo session_name();?>' : '<?php echo session_id();?>',
	                        },
	                        'fileTypeDesc' : '上传文件',//上传描述
	                        'fileTypeExts' : '<?php echo $set['filetype'];?>',
	                        'swf'      : 'http://localhost/c45/xiangmu/boke/boke/Static/uploadify/uploadify.swf',
	                        'uploader' : '<?php echo U("Flink/upload");?>',
	                        'buttonText':'选择文件',
	                        'fileSizeLimit' : '2000KB',
	                        'uploadLimit' : 1000,//上传文件数
	                        'width':65,
	                        'height':25,
	                        'successTimeout':10,//等待服务器响应时间
	                        'removeTimeout' : 0.2,//成功显示时间
	                        'onUploadSuccess' : function(file, data, response) {
	                            data=$.parseJSON(data);
	                            var imageUrl = data.image?data.url:'http://localhost/c45/xiangmu/boke/boke/Static/image/default.png';
	                            var li="<li path='"+data.path+"' url='"+data.url+"'><img src='"+imageUrl+"' class='hd-w80 hd-h70'/><input type='hidden' name='logo' value='"+data.path+"'</li>";
	                            $("#uploadList ul").prepend(li);
	                        }
	                    });
	                });
	            </script>
	            <div id="uploadList">
	                <ul>
	 					<img src="<?php echo $data['logo'];?>" alt="">
	                </ul>
	            </div>
	        </div>

		    	</td>
		    </tr>
		    <tr>
		    	<th>Url</th>
		    	<td><input type="text" name="url" id="" value="<?php echo $data['url'];?>"></td>
		    </tr>
		    <tr>
		    	<th>显示</th>
		    	<td>
		    		<input     <?php if($data['is_show']==1){ ?>checked=""<?php } ?> type="radio" name="is_show" id="1"> 显示
		    		<input type="radio"     <?php if($data['is_show']==0){ ?>checked=""<?php } ?> name="is_show" id="0"> 隐藏
		    	</td>
		    </tr>
		    <tr>
		    	<th></th>
		    	<td>
		    		<input type="submit" value="保存">
		    	</td>
		    </tr>
		    </tbody>
		</table>
	</form>
</body>
</html>